$(function(){  

	function GetRequest() {  
		   var url = location.search; //获取url中"?"符后的字串  
		   var theRequest = new Object();  
		   if (url.indexOf("?") != -1) {  
		      var str = url.substr(1);  
		      strs = str.split("&");  
		      for(var i = 0; i < strs.length; i ++) {  
		         theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);  
		      }  
		   }  
		   return theRequest;  
		}  
	  var arrayid= GetRequest();
	  console.info(arrayid);
      var array = arrayid.list;
     
      console.info("array"+array);
	  var orderIds = array.split(",");
	  var id = orderIds[0];
	  var p ={id:id}; 
	 
	  $.ajax({
			  type:"POST",
			  url:"/movie.front/orderController/getOrderNoById",
			  data:JSON.stringify(p),
			  dataType:"json",
			  contentType:"application/json",
			  success:function(data){
	           result = data.result;
	         
	           for(var i=0;i<result.length;i++){
	        		var orderNoString = '';
	        	orderNoString=orderNoString+result[i].ORDER_NO;
	        	$('#code').append('<div id='+orderNoString+' style="margin-left:300px"></div><br/><br/>')
	        	appendDimension(orderNoString);
	           }
			  }
		   });
	/*  $("#code").qrcode({ 
		    render: "table", //table方式 
		    width: 200, //宽度 
		    height:200, //高度 
		    text: orderNoString //任意内容 
		}); */
	  
	  function appendDimension(orderNoString){
		  $("#"+orderNoString).qrcode({ 
			    render: "table", //table方式 
			    width: 200, //宽度 
			    height:200, //高度 
			    text: orderNoString //任意内容 
			});
	  }
	   $('#aa').click(function(){
		   window.location.href="indexmain.html";
		 });
			
});
